#ifndef _FILETREE_H
#define _FILETREE_H

#include <iostream>
#include <string>
#include "../tree/tree.hh"
#include "../ufile/ufile.h"
#include "../user/user.h"

using namespace std;

typedef tree<UFile> file_tree;
/// Classe Arbre de Fichiers permétant d'organiser une arborescence
class FileTree
{
public:
//Constructeur Destructeurs
    FileTree(void);
    ~FileTree(void);
//Accesseurs
    bool _indexSLinks(void) const;
//Mutateurs
    void setIndexSLinks(bool);
//Autre
    int indexLocalFolder(string, User*);
    void mergeWith(const FileTree&);
    const file_tree& _localFiles() const;
    void setLocalFiles(file_tree);
private:
    bool indexSLinks;
    file_tree localFiles;
    int indexLocalSubFolder(file_tree&, string, User*, file_tree::iterator);
//    DIR *dp;
//    struct dirent *dirp;
//    struct stat file_status; // structure contenant les infos
};

#endif
